package com.xiaobai.model.entity.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 操作日志记录
 * </p>
 *
 * @author author
 * @since 2024-11-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("oper_log")
@Tag(name="OperLog对象", description="操作日志记录")
public class OperLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(name = "日志主键")
    @TableId(value = "oper_id", type = IdType.AUTO)
    private Long operId;

    @Schema(name = "模块标题")
    private String title;

    @Schema(name = "业务类型（0其它 1新增 2修改 3删除）")
    private Integer businessType;

    @Schema(name = "方法名称")
    private String method;

    @Schema(name = "请求方式")
    private String requestMethod;

    @Schema(name = "操作类别（0其它 1后台用户 2手机端用户）")
    private Integer operatorType;

    @Schema(name = "操作人员")
    private String operName;

    @Schema(name = "部门名称")
    private String deptName;

    @Schema(name = "请求URL")
    private String operUrl;

    @Schema(name = "主机地址")
    private String operIp;

    @Schema(name = "操作地点")
    private String operLocation;

    @Schema(name = "请求参数")
    private String operParam;

    @Schema(name = "返回参数")
    private String jsonResult;

    @Schema(name = "操作状态（0正常 1异常）")
    private Integer status;

    @Schema(name = "错误消息")
    private String errorMsg;

    @Schema(name = "操作时间")
    private LocalDateTime operTime;


}
